#include <i386/console.h>
#include <stdlib.h>
#include <sys/types.h>

int isnan(double d) {
	register struct IEEEdp {
		u_int manl : 32;
		u_int manh : 20;
		u_int  exp : 11;
		u_int sign :  1;
	} *p = (struct IEEEdp *)&d;
	
	return(p->exp == 2047 && (p->manh || p->manl));
}

int write(int a, char *b, int c) {
	b[c] = 0;
	cputs(b);
	return c;
}
